package org.dftproject.lineagelinkage.ui;

import org.dftproject.genesis.core.tasks.ITask;
import org.dftproject.genesis.ui.tasks.NavigationTaskHandler;
import org.dftproject.lineagelinkage.ui.views.DuplicatesView;

public class ResolveDuplicatesTask implements ITask {

	private final String id;
	private long count;

	public ResolveDuplicatesTask(String id, long count) {
		this.id = id;
		this.count = count;
	}

	public String getId() {
		return id;
	}

	public String getType() {
		return NavigationTaskHandler.NAVIGATION_TASK_TYPE;
	}

	public String getLabel() {
		return "Resolve potential duplicates (" + count + ")";
	}

	public String getAttribute(String name) {
		if ("navigation".equals(name))
			return "openView";
		if ("viewId".equals(name))
			return DuplicatesView.ID;
		return null;
	}

	public void setCount(long count) {
		this.count = count;
	}

}
